const { Schema, model, SchemaTypes } = require("mongoose");
const MenuSchema = new Schema(
    {
        title: {
            type: String,
            required: true,
        },
        icon: {
            type: String,
        },
        path: {
            type: String,
        },
        parentId: { type: SchemaTypes.ObjectId },
    },
    {
        timestamps: {
            createdAt: "createTime",
            updatedAt: "updateTime",
        },
    }
);
module.exports = model("Menu", MenuSchema);
